package com.wyp.design.pattern.structural.decorator.v2;

/**
 * 需要四个要点 抽象实体，具体实体， 抽象装饰者，具体装饰者
 * @author: Oliver
 * @time: 2020/5/13/16:32
 */
public class Test {
    public static void main(String[] args) {
        ABatterCake aBatterCake = new BatterCake();
        aBatterCake = new BatterCakeWithEggDecorator(aBatterCake);
        aBatterCake = new BatterCakeWithEggDecorator(aBatterCake);
        System.out.println(aBatterCake.getDesc() + " --- " + aBatterCake.cost());
    }
}
